package com.imooc.api.controller.admin;

import com.imooc.grance.result.GraceJsonResult;
import com.imooc.pojo.bo.SaveCategoryBO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;

/**
 * Created with IntelliJ IDEA.
 *
 * @auther Levi
 * @Date: 2021/03/21/19:56
 * @Description:
 */
@Api(tags = "文章分类管理Controller",value = "文章分类管理Controller")
@RequestMapping("categoryMng")
public interface CategoryControllerApi {

    @ApiOperation(value = "新增或修改文章分类",notes = "新增或修改文章分类",httpMethod = "POST")
    @PostMapping("/saveOrUpdateCategory")
    public GraceJsonResult saveOrUpdateCategory(@Valid @RequestBody SaveCategoryBO saveCategoryBO);


    @ApiOperation(value = "查看文章分类列表", notes = "查看文章分类列表", httpMethod = "POST")
    @PostMapping("/getCatList")
    public GraceJsonResult getCatList();

    @ApiOperation(value = "用户查看文章分类列表", notes = "用户查看文章分类列表", httpMethod = "GET")
    @GetMapping("/getCats")
    public GraceJsonResult getCats();
}
